.card-box {
  width: 100%;
  max-width: 900px;
  margin: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-box:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 搜索区域 */
.search-section {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
  padding: 20px;
}

.search-label {
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.search-input {
  max-width: 300px;
}

/* 权限容器 */
.permissions-container {
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fff;
  margin: 0 20px 20px 20px;
}

.permissions-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 16px;
}

/* 权限项 */
.permission-item {
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.permission-item:hover {
  background-color: #f5f7fa;
}

.permission-category {
  margin-bottom: 8px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.permission-category.highlighted {
  background-color: #fff2e8;
  border: 2px solid #ff6b35;
}

/* 主分类样式 */
.main-category {
  cursor: pointer;
  user-select: none;
  background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #e4e7ed;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.expand-icon {
  transition: transform 0.3s ease;
  color: #666;
  font-size: 16px;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

/* 操作权限容器 */
.actions-container {
  padding: 12px 16px;
  background: #fafbfc;
  border-top: 1px solid #e4e7ed;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-item {
  display: inline-block;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #d9ecff;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-item:hover {
  background: #e6f7ff;
  border-color: #409eff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(64, 158, 255, 0.2);
}

.action-item.highlighted {
  background: #fff2e8;
  border-color: #ff6b35;
}

/* 全选样式 */
.select-all {
  border-bottom: 2px solid #e4e7ed;
  margin-bottom: 16px;
  padding: 12px 16px;
  font-weight: 600;
  color: #2c3e50;
  background: linear-gradient(90deg, #fff 0%, #f8f9fa 100%);
  border-radius: 6px;
  margin: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 加载状态样式 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
  font-size: 14px;
}

.loading-container .el-icon {
  font-size: 24px;
  margin-bottom: 12px;
  color: #409eff;
}

.loading-container .is-loading {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
